import com.hp.hpl.jena.query.Query;
import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.QueryExecutionFactory;
import com.hp.hpl.jena.query.QueryFactory;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.query.ResultSetFormatter;

public class Test {

public static void main(String[] args) {
		

		String sparqlEndpointUrl = "http://dbpedia.org/sparql";
		String sparqlUri = Util.getPath("query/qVO_dbpedia.rq"); // VO_q00.sparql ... VO_q13.sparql

		/************************************************************************************************/		
		
	
		Query query = QueryFactory.read(sparqlUri);

		QueryExecution qexec = QueryExecutionFactory.sparqlService(sparqlEndpointUrl, query) ;
		try {
			ResultSet results = qexec.execSelect() ;
			ResultSetFormatter.out(System.out, results, query) ;
		} finally { qexec.close() ; }

	}
}
